<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/common.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base target="_self">
    <title>新增指标</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="新增,指标">
	<meta http-equiv="description" content="This is my page">

	<style type="text/css">
	</style>

  </head>
  
  <body>
    <center>
    	<s:form name="frm" id="frm" method="post" action="" namespace="">
    		<jsp:include page="/jsp/outward/business/common/menuLink.jsp">
    			<jsp:param name="menuLink" value="[{'name':'收入支出管理'},{'name':'指标管理'},{'name':'新增指标'}]"/>
    			<jsp:param name="width" value="70%"/>
    		</jsp:include>
    		
    		<s:hidden name="kindergartenId" id="kindergartenId"></s:hidden>
    		
    		<table width="100%" cellspacing="1" cellpadding="3" bgcolor="#CCCCCC">
    			<tr bgcolor="#FFFFFF">
    				<td width="25%" align="right" class="label">
    					指标名称：
    					<br>
    					<font color="red">(20字以内)</font>
    				</td>
    				<td width="75%" align="left" colspan="3">
    					<s:textfield name="iei.indexName" id="indexName" cssStyle="width:100%" maxlength="20"></s:textfield>
    				</td>
    			</tr>
    			<tr bgcolor="#FFFFFF">
    				<td align="right" class="label">
    					指标类型：
    				</td>
    				<td align="left" colspan="3">
    					<s:select name="iei.type.id" id="indexType" list='indexTypeList' listKey="id" listValue="dataValue" cssStyle="width:100px" headerKey="" headerValue="--请选择--"></s:select>
    				</td>
    			</tr>
    		</table>
    		
    		<table width="100%" cellspacing="0">
    			<tr>
    				<td align="center" valign="bottom" height="30">
    					<input type="button" value="新增" class="btn" onclick="addIndex()" />
    				</td>
    			</tr>
    		</table>
    		
    		
    	</s:form>
    </center>
    
    <script type="text/javascript">
    function addIndex()
    {
    	var indexName = $('#indexName');
    	var indexType = $('#indexType');
    	if(!isNotNull(indexName.val()))
    	{
    		showMsg('指标名称不能为空。', function(){indexName.focus();});
    		return;
    	}
    	if(!isNotNull(indexType.val()))
    	{
    		showMsg('指标类型不能为空。', function(){indexType.focus();});
    		return;
    	}
    	var url = 'inner/charge/addIncomeExpenseIndex.action';
    	ajaxAction(url, 'post', 'frm', true, function(result){
    		if('success' == result)
    		{
	    		window.opener.searchThis();
	    		window.close();
	    	}
    	});
    }
    </script>
  </body>
</html>
